"""
以下为app登录模块配置信息
"""
from selenium.webdriver.common.by import By

order_on = None
# 取消
app_cancel = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/cancel_tv']"
# 我的
app_login_my = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/mine_img']"
# 登录图片
app_login_link = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/head_img']"
# 用户名
app_username = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/mobile_et']"
# 密码
app_pwd = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/pwd_et']"
# 协议
app_por = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/agree_btn']"
# 登录按钮
app_login_btn = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/login_tv']"
# 昵称
app_nickname = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/nick_name_tv']"

"""
以下为app订单模块配置信息
"""
# 首页
app_order_index = By.XPATH, "//*[@text='首页']"
# 搜索框1
app_order_search1 = By.XPATH, "//*[@class='android.widget.EditText']"
# 搜索框2
app_order_search12 = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/search_et']"
# 搜索按钮 com.tpshop.malls:id/search_btn
app_order_search_btn = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/search_btn']"
# 点击第一张图片 com.tpshop.malls:id/product_pic_img
app_order_phone = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/product_pic_img']"
app_order_phone2 = By.XPATH, "//*[@bounds='[282,123][526,367]']"

# 加入购物车
app_order_add_cart = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/add_cart_tv']"
# 点击确定
app_order_sure = By.XPATH, "//*[@text='确定']"
# 点击购物车
app_order_click_cart = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/bottom_cart_img']"
# 点击立即购买 com.tpshop.malls:id/buy_tv
app_order_now_purchase = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/buy_tv']"
# 提交订单 com.tpshop.malls:id/submit_tv
app_order_submit_order = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/submit_tv']"
# 立即支付 com.tpshop.malls:id/pay_btn
app_order_now_pay = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/pay_btn']"
# 输入密码 com.tpshop.malls:id/pwd_et
app_order_input_pwd = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/pwd_et']"
# 点击确认
app_order_sure2 = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/sure_tv']"
# 获取订单编号
app_order_number = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/pay_trade_no_tv']"
"""
以下为web登录模块配置信息
"""
# 用户名
web_login_username = By.XPATH, "//*[@name='username']"
# 密码
web_login_pwd = By.CSS_SELECTOR, "[name='password']"
# 验证码
web_verify_code = By.CSS_SELECTOR, "[name='vertify']"
# 点击登录
web_login_btn = By.CSS_SELECTOR, "[name='submit']"
# 昵称
web_nickname = By.CSS_SELECTOR, ".bgdopa-t"
"""
以下为web订单模块配置信息
"""
# 1.商品订单
web_order = By.XPATH, "//a[text()='订单']"
# 2.左侧菜单 发货单
web_deliver_order = By.XPATH, "//a[text()='发货单']"
# 3.iframe
web_iframe = By.CSS_SELECTOR, "#workspace"
# 4.去发货 //div[text()='202209011718373162']/../../..//td[@class='handle']//a[1]
web_go_goods = By.XPATH, "//a[text()='去发货']"
# web_go_goods = By.XPATH, f"//div[text()='{order_on}']/../../..//td[@class='handle']//a[1]"

# 5.物流公司
web_company = By.XPATH, "//*[@value='YZPY']"
# 6.配送单号
web_deliver_number = By.CSS_SELECTOR, "#invoice_no"
# 7.确认发货
web_ok_order = By.CSS_SELECTOR, ".ncap-btn-send"
# 8.打印配置单
web_print_order = By.CSS_SELECTOR, ".fa-print"
# 9.获取订单编号 //div[@class='contact-info']/dl[1]/dd[2]
web_get_order_number = By.XPATH, "//div[@class='contact-info']/dl[1]/dd[2]"
